<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>[Generic Component Framework v3] GCF::ObjectMapWatcher Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--link href="tabs.css" rel="stylesheet" type="text/css"-->
</head><body>
 <div id="wrapper">
    <div id="logo_box">
        <a class="img_link" href="https://github.com/pnudupa/gcf" target="_blank" ><img style="float:left;margin-left:10px;margin-top:5px;margin-bottom:5px;"src="header_gcf_logo.jpg" alt="GCF LOGO"/></a>
        <a class="img_link" href="https://www.vcreatelogic.com/" target="_blank" ><img style="float:right;margin-right:10px; margin-top: 30px;" src="header_vcl_logo.jpg" alt="VCL LOGO"/></a>
        <div style="clear:both"></div>
    </div>
    <div class="nav">
        <ul>
            <li class="selectedpage">
                <a class="a-home" href="index.html" >
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a class="a-classes " href="classes.html">
                    <span>All Classes</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_modules.html">
                    <span>Modules</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_guides_and_videos.html">
                    <span>Guides & Videos</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_tools_and_inbuilt_components.html">
                    <span>Tools & Components</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main-content">
        <div class="inside">
        <div>
<!-- Generated by Doxygen 1.8.16 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GCF</b></li><li class="navelem"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html">ObjectMapWatcher</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_g_c_f_1_1_object_map_watcher-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GCF::ObjectMapWatcher Class Reference<div class="ingroups"><a class="el" href="group__gcf__core.html">GCF Core Module</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>This watches over <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a> to emit signals when the objects are inserted, removed or deleted from <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a>.  
 <a href="class_g_c_f_1_1_object_map_watcher.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
Signals</h2></td></tr>
<tr class="memitem:a06047cb1464d4e7f3f2a5c0253da5183"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#a06047cb1464d4e7f3f2a5c0253da5183">objectInserted</a> (QObject *obj)</td></tr>
<tr class="separator:a06047cb1464d4e7f3f2a5c0253da5183"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0c344682c5749e2b433bfcabd04de26"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#ae0c344682c5749e2b433bfcabd04de26">objectRemoved</a> (QObject *obj)</td></tr>
<tr class="separator:ae0c344682c5749e2b433bfcabd04de26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e478f73ccd9b365bd9e8f98731534c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#a4e478f73ccd9b365bd9e8f98731534c1">objectDeleted</a> (QObject *obj)</td></tr>
<tr class="separator:a4e478f73ccd9b365bd9e8f98731534c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab032a05655a11f57893af9b376984e76"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#ab032a05655a11f57893af9b376984e76">ObjectMapWatcher</a> (QObject *parent=nullptr)</td></tr>
<tr class="separator:ab032a05655a11f57893af9b376984e76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7979034add98c4198d98b77cf62f4dc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#ae7979034add98c4198d98b77cf62f4dc">~ObjectMapWatcher</a> ()</td></tr>
<tr class="separator:ae7979034add98c4198d98b77cf62f4dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aefbbf38abb8e7c934c4be27f735749"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a1aefbbf38abb8e7c934c4be27f735749"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#a1aefbbf38abb8e7c934c4be27f735749">watch</a> (<a class="el" href="class_g_c_f_1_1_object_map.html">ObjectMap</a>&lt; T &gt; &amp;map)</td></tr>
<tr class="separator:a1aefbbf38abb8e7c934c4be27f735749"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ba42b0308e7ea0cb03bb566f883297d"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_watcher.html#a3ba42b0308e7ea0cb03bb566f883297d">listenerType</a> () const</td></tr>
<tr class="separator:a3ba42b0308e7ea0cb03bb566f883297d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_g_c_f_1_1_object_map_event_listener"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_g_c_f_1_1_object_map_event_listener')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_g_c_f_1_1_object_map_event_listener.html">GCF::ObjectMapEventListener</a></td></tr>
<tr class="memitem:a9db5dad4abfd8b9aaf74e2ed95976d62 inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_event_listener.html#a9db5dad4abfd8b9aaf74e2ed95976d62">ObjectMapEventListener</a> ()</td></tr>
<tr class="separator:a9db5dad4abfd8b9aaf74e2ed95976d62 inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92807c8dcb2443d3b737d1deb23053d7 inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_event_listener.html#a92807c8dcb2443d3b737d1deb23053d7">~ObjectMapEventListener</a> ()</td></tr>
<tr class="separator:a92807c8dcb2443d3b737d1deb23053d7 inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68df2af538ab51e27efff04e07cd9611 inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_event_listener.html#a68df2af538ab51e27efff04e07cd9611">objectInserted</a> (QObject *object)</td></tr>
<tr class="separator:a68df2af538ab51e27efff04e07cd9611 inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f1aea36005765c1260e396cf2b7cd5b inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_event_listener.html#a1f1aea36005765c1260e396cf2b7cd5b">objectRemoved</a> (QObject *object)</td></tr>
<tr class="separator:a1f1aea36005765c1260e396cf2b7cd5b inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc6d593a721948f0f6b0e9972d7ecd8d inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_object_map_event_listener.html#afc6d593a721948f0f6b0e9972d7ecd8d">objectDeleted</a> (QObject *object)</td></tr>
<tr class="separator:afc6d593a721948f0f6b0e9972d7ecd8d inherit pub_methods_class_g_c_f_1_1_object_map_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p> 
<pre>
#include &lt;GCF3/ObjectMap&gt;
</pre>
</p>
<p>You can set this to watch over a <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a> by using <a class="el" href="class_g_c_f_1_1_object_map_watcher.html#a1aefbbf38abb8e7c934c4be27f735749">GCF::ObjectMapWatcher::watch(ObjectMap &amp;list)</a> method.</p>
<p>Only one watcher can watch over <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a> at a time.If there is already a watcher watching that <a class="el" href="class_g_c_f_1_1_object_map.html" title="This class manages a map of QObject-value pairs.">ObjectMap</a> when a new one is set, then it will be replaced with the new one. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab032a05655a11f57893af9b376984e76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab032a05655a11f57893af9b376984e76">&#9670;&nbsp;</a></span>ObjectMapWatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectMapWatcher::ObjectMapWatcher </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>nullptr</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default constructor. </p>

</div>
</div>
<a id="ae7979034add98c4198d98b77cf62f4dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7979034add98c4198d98b77cf62f4dc">&#9670;&nbsp;</a></span>~ObjectMapWatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectMapWatcher::~ObjectMapWatcher </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a1aefbbf38abb8e7c934c4be27f735749"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1aefbbf38abb8e7c934c4be27f735749">&#9670;&nbsp;</a></span>watch()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectMapWatcher::watch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_object_map.html">ObjectMap</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>map</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a> to watch. If there is already a watcher watching that <a class="el" href="class_g_c_f_1_1_object_map.html" title="This class manages a map of QObject-value pairs.">ObjectMap</a>, then it will be replaced with this. </p>

</div>
</div>
<a id="a3ba42b0308e7ea0cb03bb566f883297d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ba42b0308e7ea0cb03bb566f883297d">&#9670;&nbsp;</a></span>listenerType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString GCF::ObjectMapWatcher::listenerType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the listener type. By default listener type is "GCF::ObjectMapEventListener". </p><dl class="section return"><dt>Returns</dt><dd>the current listener type </dd></dl>

<p>Reimplemented from <a class="el" href="class_g_c_f_1_1_object_map_event_listener.html#adfabe2440ff25e32276f79f1f1cd4b3f">GCF::ObjectMapEventListener</a>.</p>

</div>
</div>
<a id="a06047cb1464d4e7f3f2a5c0253da5183"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06047cb1464d4e7f3f2a5c0253da5183">&#9670;&nbsp;</a></span>objectInserted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectMapWatcher::objectInserted </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a <code>QObject</code> is added to the watching <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer added. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae0c344682c5749e2b433bfcabd04de26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0c344682c5749e2b433bfcabd04de26">&#9670;&nbsp;</a></span>objectRemoved</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectMapWatcher::objectRemoved </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a <code>QObject</code> is removed from the watching <a class="el" href="class_g_c_f_1_1_object_map.html">GCF::ObjectMap</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer removed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4e478f73ccd9b365bd9e8f98731534c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e478f73ccd9b365bd9e8f98731534c1">&#9670;&nbsp;</a></span>objectDeleted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::ObjectMapWatcher::objectDeleted </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when <code>QObject</code> inside watching <a class="el" href="class_g_c_f_1_1_object_map.html">ObjectMap</a> is deleted from anywhere inside application. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer deleted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
</div>
</div>
<div class="footer_content">
<table width="100%" class="footer">
<tr>
<td align="left" width="50%">Copyright &copy; 2013-2019,
 <a class="el" href="http://www.vcreatelogic.com" target="_black">VCreate Logic Private Limited</a></td>
<td align="right" width="50%"><a class="el" href="http://www.vcreatelogic.com/products/gcf" target="_black">GCF - Generic Component Framework</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
